dispatchKeyEvent
open fun dispatchKeyEvent(@NonNull component: KeyEventDispatcher.Component, @Nullable root: View, @Nullable callback: Window.Callback, @NonNull event: KeyEvent): Boolean(source)
Call this when dispatching a key event. This is usually called in lieu of the Window.Callback dispatchKeyEvent implementation (eg. instead of calling super.dispatchKeyEvent in an Activity).
Return
true
if the event was consumed, false
otherwise
Parameters
component
the component implementation
root
the root of the view hierarchy that this event will be dispatched to
callback
a Window.Callback implementation or null
if there isn't one
event
the event to dispatch